import { dataDictionary } from '@/config/dict'

export const tableColumn = (page, size) => {
  return [
    {
      key: 'dicValue',
      label: '名称',
      minWidth: 100
    },
    {
      key: 'groupName',
      label: '类别',
      minWidth: 140
    },
    {
      key: 'orderNo',
      label: '序号',
      minWidth: 120
    }
    // {
    //   key: 'createTime',
    //   label: '创建时间',
    //   minWidth: 200
    // }
  ]
}

export const updateFormItem = disabled => {
  return [
    {
      type: 'select',
      key: 'groupName',
      label: '类别',
      required: true,
      col: 24,
      slotAttrs: {
        disabled: true,
        options: dataDictionary,
        select: '业务类型',
        style: {
          width: '248px'
        },
        size: 'small'
      }
    },
    {
      type: 'input',
      key: 'dicValue',
      label: '名称',
      required: true,
      col: 24,
      slotAttrs: {
        style: {
          width: '248px'
        },
        size: 'small'
      }
    },
    {
      type: 'input',
      key: 'orderNo',
      label: '序号',
      required: true,
      col: 24,
      slotAttrs: {
        style: {
          width: '248px'
        },
        placeholder: '请输入数字',
        size: 'small',
        type: 'number'
      }
    }
  ]
}
